<?php
// 2011-06-09 21:03
class SchoolAction extends Action
{
    /**
    +----------------------------------------------------------
    * 默认操作
    +----------------------------------------------------------
    */
    public function index()
    {
        
				$School = M("School"); // 实例化User对象    
				import("@.ORG.Page"); //导入分页类
				$count = $School->count();    //计算总数
				$p = new Page( $count, 8);
				$list=$School->limit($p->firstRow.','.$p->listRows)->order('id desc')->findAll();
				$p->setConfig('header','条记录');
				$p->setConfig('prev',"<");
				$p->setConfig('next','>');
				$p->setConfig('first','<<');
				$p->setConfig('last','>>');
				$page = $p->show ();
				$this->assign( "page", $page );
				$this->assign ( "list", $list );
				//$this->display();
				$this->display(APP_PATH.'/Tpl/default/school.html');
    }
    
    /**
    +----------------------------------------------------------
    * 探针模式
    +----------------------------------------------------------
    */
    public function checkEnv()
    {
        load('pointer',THINK_PATH.'/Tpl/Autoindex');//载入探针函数
        $env_table = check_env();//根据当前函数获取当前环境
        echo $env_table;
    }

}
?>